package com.sf.protal.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class ServerStartListener implements ServletContextListener {

	@Override
	public void contextInitialized(ServletContextEvent sce) {
		// 将web应用的名称保存到application中
		ServletContext app = sce.getServletContext();
		String path = app.getContextPath();
		app.setAttribute("APP_PATH",path);
	}

	@Override
	public void contextDestroyed(ServletContextEvent sce) {

	}
}
